package com.terrace.core.spring.support;

import org.springframework.aop.framework.AopProxyUtils;

/**
 * 拦截器基类
 * @author jiangyg
 *
 */
public class BaseAspectSupport {
	
	/**
	 * 获取最终的目标class
	 * @param target
	 * @return
	 */
	protected Class<?> getTargetClass(Object target) {
		Class<?> targetClass = AopProxyUtils.ultimateTargetClass(target);
		if (targetClass == null && target != null) {
			targetClass = target.getClass();
		}
		return targetClass;
	}

}
